<html>
<head>
	<meta charset="UTF-8">
	<title>次级域名分发系统登录</title>
	<link rel="stylesheet" href="jquery-easyui-1.9.14/themes/default/easyui.css" />
	<link rel="stylesheet" href="jquery-easyui-1.9.14/themes/icon.css" />
	<script type="text/javascript" src="jquery-easyui-1.9.14/jquery.min.js"></script>
	<script type="text/javascript" src="jquery-easyui-1.9.14/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="jquery-easyui-1.9.14/locale/easyui-lang-zh_CN.js"></script>
	<script type='text/javascript' src='bug-min.js'></script>
	<style type="text/css">
		body{
			background-image:url('bg.svg');
			width : 100%;
			margin: 0 auto;
		}
		table{
		    margin: auto;
		}
	</style>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=yes" />
	<style type="text/css"> 
		@media(max-width:960px){
			body {
				width:100%;
				background-image:url('bg.svg');
			} 
		}
	</style>
</head>
<body>
	<div id="dlg" class="easyui-dialog" title="登录次级域名分发系统" style="width: 320px; height: 270px; padding: 10px">
		<form id="ff" method="post" action="/login" >
			<div style="margin-bottom:18px">
				<b>用户:</b><input id="username" name="username" style="width:100%" onblur="checkUserId()" /><div id="useridtip" style="font-size: 10px"><font color="gray">请输入用户名</font></div>
			</div>
			<div style="margin-bottom:18px">
				<b>密码:</b><input id="password" name="password" type="password" style="width:100%" /><div id="useridtip" style="font-size: 10px"><font color="gray">请输入密码</font></div>
			</div>
		</form>
		<a href="reg"><font style="font-size: 10px">第一次使用？点此注册管理员</font></a>
	</div>
	
	<script>
		new BugController({'minBugs':1, 'maxBugs':1, 'mouseOver':'fly'});
		$('#dlg').dialog({
		    cache: false,
			iconCls: 'icon-man',
			resizable: false,
			closable: false,
		    modal: true,
			buttons: [{
				text:'登录',
				iconCls:'icon-ok',
				handler:function(){
					submitForm();
				}
			},{
				text:'重置',
				handler: function(){
					clearForm();
				}
			}]
		});
	
		function submitForm(){
			if(checkUserId()&&checkPwd()){
				$('#ff').submit();
			}
		}
		function clearForm(){
			$('#ff').form('clear');
		}
		function checkUserId(){
			var flag = false;
			var userid = $('#username').val();
			if(userid!=''){
				flag = true;
			}
			return flag;
		}
		function checkPwd(){
			var flag = false;
			var pwd1 = $('#password').val();
			if(pwd1!=''){
				flag = true;
			}
			return flag;
		}
	</script>
</body>
</html>
